package main

import "strings"

func main() {

}

func maxProduct(words []string) (res int) {
	n := len(words)
	for i := 0; i < n; i++ {
		n1 := len(words[i])
		for j := i + 1; j < n; j++ {
			if n1*len(words[j]) <= res {
				continue
			}
			if !strings.ContainsAny(words[i], words[j]) {
				res = n1 * len(words[j])
			}
		}
	}
	return
}
